{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "find git in  .\n",
      ".\n",
      "['.git']\n",
      "['dive_in2pytorch1.ipynb', 'dive_in2pytorch2.ipynb', 'test.ipynb']\n",
      "find git in  .\\.git\n",
      ".\\.git\n",
      "['hooks', 'info', 'logs', 'objects', 'refs']\n",
      "['COMMIT_EDITMSG', 'config', 'description', 'FETCH_HEAD', 'HEAD', 'index', 'packed-refs']\n",
      "find git in  .\\.git\\hooks\n",
      ".\\.git\\hooks\n",
      "[]\n",
      "['applypatch-msg.sample', 'commit-msg.sample', 'fsmonitor-watchman.sample', 'post-update.sample', 'pre-applypatch.sample', 'pre-commit.sample', 'pre-merge-commit.sample', 'pre-push.sample', 'pre-rebase.sample', 'pre-receive.sample', 'prepare-commit-msg.sample', 'push-to-checkout.sample', 'update.sample']\n",
      "find git in  .\\.git\\info\n",
      ".\\.git\\info\n",
      "[]\n",
      "['exclude']\n",
      "find git in  .\\.git\\logs\n",
      ".\\.git\\logs\n",
      "['refs']\n",
      "['HEAD']\n",
      "find git in  .\\.git\\logs\\refs\n",
      ".\\.git\\logs\\refs\n",
      "['heads', 'remotes']\n",
      "[]\n",
      "find git in  .\\.git\\logs\\refs\\heads\n",
      ".\\.git\\logs\\refs\\heads\n",
      "[]\n",
      "['master']\n",
      "find git in  .\\.git\\logs\\refs\\remotes\n",
      ".\\.git\\logs\\refs\\remotes\n",
      "['origin']\n",
      "[]\n",
      "find git in  .\\.git\\logs\\refs\\remotes\\origin\n",
      ".\\.git\\logs\\refs\\remotes\\origin\n",
      "[]\n",
      "['HEAD', 'master']\n",
      "find git in  .\\.git\\objects\n",
      ".\\.git\\objects\n",
      "['23', '33', 'a5', 'd3', 'info', 'pack']\n",
      "[]\n",
      "find git in  .\\.git\\objects\\23\n",
      ".\\.git\\objects\\23\n",
      "[]\n",
      "['9789d1c5982da44e54aa1409d853e36a187103']\n",
      "find git in  .\\.git\\objects\\33\n",
      ".\\.git\\objects\\33\n",
      "[]\n",
      "['79abdddd606598b0367a3cd8800232880715b3']\n",
      "find git in  .\\.git\\objects\\a5\n",
      ".\\.git\\objects\\a5\n",
      "[]\n",
      "['1f8248c8ec5b3e1de59b4c59d720db157e6fb8']\n",
      "find git in  .\\.git\\objects\\d3\n",
      ".\\.git\\objects\\d3\n",
      "[]\n",
      "['c43eb90509904e302057d0e073d9c686d91e62']\n",
      "find git in  .\\.git\\objects\\info\n",
      ".\\.git\\objects\\info\n",
      "[]\n",
      "[]\n",
      "find git in  .\\.git\\objects\\pack\n",
      ".\\.git\\objects\\pack\n",
      "[]\n",
      "['pack-2eb34f16c2b4d08efa7700e8e78a90b7ea061b3c.idx', 'pack-2eb34f16c2b4d08efa7700e8e78a90b7ea061b3c.pack']\n",
      "find git in  .\\.git\\refs\n",
      ".\\.git\\refs\n",
      "['heads', 'remotes', 'tags']\n",
      "[]\n",
      "find git in  .\\.git\\refs\\heads\n",
      ".\\.git\\refs\\heads\n",
      "[]\n",
      "['master']\n",
      "find git in  .\\.git\\refs\\remotes\n",
      ".\\.git\\refs\\remotes\n",
      "['origin']\n",
      "[]\n",
      "find git in  .\\.git\\refs\\remotes\\origin\n",
      ".\\.git\\refs\\remotes\\origin\n",
      "[]\n",
      "['HEAD', 'master']\n",
      "find git in  .\\.git\\refs\\tags\n",
      ".\\.git\\refs\\tags\n",
      "[]\n",
      "[]\n"
     ]
    }
   ],
   "source": [
    "for root,dirs,files in os.walk('.'):\n",
    "    if root.find('git')!=-1:\n",
    "        print(\"find git in \",root)\n",
    "    print(root)\n",
    "    print(dirs)\n",
    "    print(files)"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "b104e73a6bc703f05e84da2cd6235ddbc2c121464bcd1bd6e4b3e43e587b3edc"
  },
  "kernelspec": {
   "display_name": "Python 3.6.8 64-bit (conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
